﻿using System;
using System.Collections.Generic;

namespace Framework.Scripts.MapData
{
    [Serializable]
    public class ObjMap<T>
    {
        private Dictionary<int, T> map;

        public ObjMap()
        {
            map = new Dictionary<int, T>();
        }

        public T this[int i]
        {
            get => Get(i);
            set => Set(i, value);
        }

        public T Get(int i)
        {
            return map[i];
        }

        public void Set(int i, T t)
        {
            map[i] = t;
        }
    }
}